import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/Layout';
Vue.use(VueRouter)

const routes = [
    {
      path:'/',
      component:Layout,
      redirect:'/home',
      children:[
        // 主页
        {path:'/home',component: ()=> import('@/views/home')},
        // 搜索页
       {path:'/souchi/:kk?',component: ()=> import('@/views/souchi'),name:'souchi'},

      ]
    }
]

const router = new VueRouter({
  routes
})
 const vPush = VueRouter.prototype.push
VueRouter.prototype.push = function(location,kd1,kd2){
  if(kd1||kd2) return vPush.call(this,location,kd1,kd2)
 return vPush.call(this,location,()=>{})
}
export default router
